#include <iostream>
#include <cstdlib>
#include "krug.h"
#include "figur.h"
#include "pr.h"

using namespace std;

int main(int argc, char *argv[])
{

    int A;
    geometr * pgeometr;
    circle * pcircle = new circle;
    rect * prect = new rect;
start:
    cout << ("Enter 1 for Okrugnost, 2 for Pryamougolnik: ");
    cin >> A;
    switch(A)
    {
    case 1: pgeometr = pcircle;
        int B;
start1:
        cout << "\nYou choose Okrugnost.\nEnter 1 for show, 2 for move: ";
        cin >> B;
        switch(B)
        {
        case 1: pgeometr->show();
            break;
        case 2: pgeometr->move();
            break;
        default: cout << "\nYou must choose 1 or 2!\n\n";
            system("pause");
            system("cls");
            goto start1;
        }
        break;
    case 2: pgeometr = prect;
        int C;
start2:
        cout << "\nYou choose Pryamougolnik.\nEnter 1 for show, 2 for move: ";
        cin >> C;
        switch(C)
        {
        case 1: pgeometr->show();
            break;
        case 2: pgeometr->move();
            break;
        default: cout << "\nYou must choose 1 or 2!\n\n";
            system("pause");
            system("cls");
            goto start2;
        }
        break;
    default: cout << "\nYou must choose 1 or 2!\n\n";
        system("pause");
        system("cls");
        goto start;
    }

}
